Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Speed up documentation check #4777

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

brotkrueml
Copy link
Contributor

It is sufficient to check one output format for errors (here "singlepage"). With this patch we gain a massive performance improvement, resulting also in less processor cycles and therefore less energy consumption.

Previously, on documentation testing (locally):

Parsing: 814/814 [============================] 100% Parsed 814 files in 17.35 seconds
Rendering: 814/814 [===========] 100% Output format html: Rendered 814 documents in 48.17 seconds
Rendering: 814/814 [============================] 100% Output format singlepage: Rendered 814 documents in 3.51 seconds
Rendering: 814/814 [============================] 100% Output format interlink: Rendered 814 documents in 0.05 seconds
Successfully placed 814 rendered HTML, SINGLEPAGE, and INTERLINK files into /project/Documentation-GENERATED-temp

With this patch (locally):

Parsing: 814/814 [============================] 100% Parsed 814 files in 17.71 seconds
Rendering: 814/814 [============================] 100% Output format singlepage: Rendered 814 documents in 8.24 seconds
Successfully placed 814 rendered SINGLEPAGE files into /project/Documentation-GENERATED-temp

Releases: main, 12.4, 11.5

It is sufficient to check check one output format for errors.
With this patch we gain a massive performance improvement, resulting also in less processor cycles and therefore less energy consumption.

Previously, on documentation testing (locally):

    Parsing: 814/814 [============================] 100% Parsed 814 files in 17.35 seconds
    Rendering: 814/814 [===========] 100% Output format html: Rendered 814 documents in 48.17 seconds
    Rendering: 814/814 [============================] 100% Output format singlepage: Rendered 814 documents in 3.51 seconds
    Rendering: 814/814 [============================] 100% Output format interlink: Rendered 814 documents in 0.05 seconds
    Successfully placed 814 rendered HTML, SINGLEPAGE, and INTERLINK files into /project/Documentation-GENERATED-temp

With this patch (locally):

    Parsing: 814/814 [============================] 100% Parsed 814 files in 17.71 seconds
    Rendering: 814/814 [============================] 100% Output format singlepage: Rendered 814 documents in 8.24 seconds
    Successfully placed 814 rendered SINGLEPAGE files into /project/Documentation-GENERATED-temp

Releases: main, 12.4
@brotkrueml brotkrueml added backport 11.5 backport 12.4 Backport to TYPO3v12 labels Sep 23, 2024
@brotkrueml brotkrueml self-assigned this Sep 23, 2024
@brotkrueml
Copy link
Contributor Author

If this gets in, I will take care of adjusting the docs check in the other repos.

@linawolf
Copy link
Member

I can remember that I was trying this in the beginning and there was some backside to it. So I would suggest we first try this out in one repository and if we recognize no ill effects roll it out after a week or two

@brotkrueml
Copy link
Contributor Author

brotkrueml commented Sep 23, 2024

I can remember that I was trying this in the beginning and there was some backside to it. So I would suggest we first try this out in one repository and if we recognize no ill effects roll it out after a week or two

Hmm, I added an error locally in an rst file, and the error was recognised (as it should). That's the reason for this workflow step, to recognise errors, isn't it?

Copy link
Contributor

@garvinhicking garvinhicking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the initiative! We do need to do something about it.

I wonder though if we should do a more flexible approach here, maybe by adding a argument like "--minimal-test" or so. Then we could internally set the output directive.

This would allow us to only change it once in other repositories and if we spot errors or further optimization, it can all be done within the container, without changing any repositories...?

@linawolf
Copy link
Member

I really like that idea!

@linawolf
Copy link
Member

I would suggest we try out the changes in this one manual but prepare to switch it to the suggested better form of having a "--minimal-test" parameter.

@linawolf
Copy link
Member

@brotkrueml please do not roll out to other manuals, but make a ticket in https://github.com/TYPO3-Documentation/render-guides/issues

@linawolf linawolf merged commit d539a10 into TYPO3-Documentation:main Sep 24, 2024
7 checks passed
@brotkrueml brotkrueml deleted the speed-up-docs-check branch September 24, 2024 07:30
@brotkrueml
Copy link
Contributor Author

@brotkrueml please do not roll out to other manuals, but make a ticket in https://github.com/TYPO3-Documentation/render-guides/issues

Feel free to create that ticket ;-)

@garvinhicking
Copy link
Contributor

I am on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 12.4 Backport to TYPO3v12
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants